<?php
/**
 * <https://y.st./>
 * Copyright © 2019 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'The Sleepless Isle',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2019/07/12.jpg" alt="Some kind of plant that caught my eye" class="framed-centred-image" width="800" height="480"/>
<section id="diet">
	<h2>Dietary intake</h2>
	<p>
		For breakfast, I had 54 grams of cereal and 144 grams of soy milk.
		For lunch, I had 73 grams of corn chips and 251 grams of salsa.
		For dinner, I had 250 grams of spaghetti, Italian sausage, and carrot with a small but unweighed cup of marinara.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			In Java, properties are known as &quot;instance methods&quot;.
			It&apos;s one of the many things Java doesn&apos;t use the standard terminology for, which also includes arguments (which Java refers to as &quot;actual parameters&quot;) and parameters (which Java refers to as &quot;formal parameters&quot;).
		</p>
		<p>
			A property is basically a variable contained within an object.
			Each object is an instance of a class, and has its own instance of each property (W3resource, 2019).
			This allows each object to keep its state separately from the states of other objects.
			Without properties, all objects of the same class would be synchronised with one another at all times, making it useless to have more than one of them.
		</p>
		<p>
			A method is a function with an associated class.
			In Java, all functions are methods, as all functions must be defined as a part of some specific class.
			Because methods are associated with a class and objects are instances of a class, objects are able to access the methods of the class they&apos;re a member of.
			This allows different classes to define different implementations for methods of with the same name.
			In a dynamically-typed language, this allows you to define objects conditionally and call the methods the objects you will use all have.
			The correct implementation will then be chosen by the object.
			Java is a statically-typed language though, you can&apos;t call methods without knowing what type of object you have.
			Using either inheritance or interfaces though, you can know enough about the object to know that it has certain methods without knowing exactly what class the object belongs to, allowing you to call the methods and have the correct implementation chosen.
			Methods - being attached to classes - can also modify the properties of the object they work on in order to change the state of the object.
		</p>
		<p>
			For example, I have a class that represents parsed $a[URI]s and an interface that specifies what one can do with parsed $a[URI]s.
			The parsed $a[URI] class enforces $a[URI] validity and performs normalisation, but some officially-recognised $a[URI] schemes use legacy syntax that doesn&apos;t fit the current definition of a $a[URI].
			Using the interface, I can implement parsers for these legacy $a[URI] schemes that still mostly behave as other $a[URI] objects, while not enforcing the syntax validity requirements.
			On the other hand, modern schemes that <strong>*do*</strong> follow the syntax rules instead inherit from the $a[URI] parser class, which does enforce validity, and also provides default implementations for most methods.
			When requesting an object of the $a[URI]-parsing class, all objects passed in are known to represent syntactically-valid $a[URI]s, while when less strictness is required, I instead request objects that implement the interface, which allows the loosely-parsed $a[URI] objects to be used in the code as well.
			Properties are used to store the parsed $a[URI] components, and methods act on those properties.
			Some methods alter the contents of the properties, making sure that the contents remain consistent with other properties in the process, while other methods simply read the properties but leave their values untouched.
			One method puts the parsed components back into a $a[URI] string, which is useful after having normalised the individual components, so you can get back the normalised form of the $a[URI].
		</p>
		<p>
			W3resource describes methods as a &quot;program module that contains a series of statements that carry out a task&quot; (W3resource, 2019).
			In other words, it&apos;s just like a function.
			In fact, it <strong>*is*</strong> a function; methods are a subset of functions.
			Functions are also a type of subroutine, so methods are subroutines as well.
			What separates methods from other functions though is that a method is always bound to a class and is defined as a part of the class&apos;s definition.
			As mentioned previously, all functions in Java are methods, so when working in Java, it&apos;s not important to make a distinction between methods and non-method functions, as there are no non-method functions.
		</p>
		<div class="APA_references">
			<h3>References:</h3>
			<p>
				w3resource.
				(2019, March 11).
				<a href="https://w3resource.com/java-tutorial/java-class-methods-instance-variables.php">Java Class, methods, instance variables - w3resource</a>.
				Retrieved from <code>https://w3resource.com/java-tutorial/java-class-methods-instance-variables.php</code>
			</p>
		</div>
	</blockquote>
</section>
<section id="Minetest">
	<h2>Minetest</h2>
	<img src="/img/CC_BY-SA_3.0/minetest.net./weblog/2019/07/12.png" alt="The main bridge, visible from the beach" class="framed-centred-image" width="1024" height="600"/>
	<p>
		I&apos;ve completed a decent chunk of the bridge.
		It runs all the way up to a spot on the side of the mountain where it&apos;ll need to tunnel through a bit.
		I&apos;ve also gathered enough silver sand to finish the ground cover, forming a bit of a silver beach on the island.
	</p>
	<p>
		I&apos;ve decided upon a name for my island.
		I&apos;m calling it the Sleepless Isle.
		Basically, as a starting point, I won&apos;t have outside resources while I&apos;m living here.
		I&apos;ll be able to bring this island&apos;s main resource - snowy pines - to my next home, but nothing from off the island is likely to end up here.
		It&apos;s a wintry area, too.
		There are no nearby jungles.
		Without jungles in which to find jungle grass, it&apos;s not possible to get cotton, which is required for making beds.
		Thus, there are no beds on this island.
		At the same time though, the main purpose of a bed is to set your personal spawn point.
		As long as I&apos;m on the island, which houses the server&apos;s spawn point, no bed is even needed.
		I think nearby, if I stay much longer, and I very likely will, I want to build Fort Insomnia nearby.
		I&apos;m also calling the island at the centre of the map World&apos;s Navel, for obvious reasons.
		It&apos;s a name originally meant for a city I was going to build on the flat spot at the centre of another map, but ended up not using that world seed.
		I like the name better for an island anyway though.
	</p>
</section>
END
);
